SOS_METHOD_TABLE

Section: SOS META CLASSES (3S)
Updated: 28/10/91
Index Return to Main Contents
man2html: unable to open or read file /usr/lib/ms/ms.acc
 

NAME

sos_Method_table - Mapping from strings to methods  

SYNOPSIS

#include "<SOS>/include/mta_sos.h"

class sos_Method_table 
  : Mapping <sos_String, List <sos_Method>> (FALSE, TRUE, FALSE)
{
public:
  sos_Method      lookup (sos_Method);
  sos_Method      lookup_or_add (sos_Method);  
  sos_Method      replace_or_add (sos_Method);

  sos_Comp_method lookup_comp (sos_String, sos_Bool);
};
 

DESCRIPTION

sos_Method_table provides access on method-lists containing methods of a specified name.

lookup (m)
returns the first method from the method list associated with the name of m, which does not overload m. The return value is NO_OBJECT, if no such method can be found. Only some of the parameters of m have to be specified: the method name and a parameter list which has at least the correct cardinality. The returned method will in general not conform to the method signature described by m (the method will have the same number of parameters, or m and the method will not be both static or non-static). Conformance can be checked by sos_Method::redefines(...) (note, that m must be fully specified for this call).
lookup_or_add (m)
If lookup(m) finds an appropriate method, this is returned. Otherwise, if there exists an entry in the table for the method name, m is appended on the associated list. If no entry exists, a new method list is created, m is inserted in this list, and the list is inserted in the method table.
replace_or_add (m)
If lookup(m) finds an appropriate method, this is replaced by m. Otherwise, if there exists an entry in the table for the method name, m is appended on the associated list. If no entry exists, a new method list is created, m is inserted in this list, and the list is inserted in the method table.
lookup_comp (s, is)
yields the first component method setting (if is==TRUE) or getting (if is==FALSE) a component named s.
 

FILES

<SOS>/src/mta/mta.sos
SOS schema file

<SOS>/src/mta/mta_sos.h
complete schema interface

<SOS>/src/mta/mta_use.h
restricted schema interface

<SOS>/src/mta/mta.c
method implementation

<SOS>/lib/sos.a
SOS library
 

SEE_ALSO

sos_Method(3), Mapping(3), List(3)  

AUTHOR

Axel Uhl


 

Index

NAME
SYNOPSIS
DESCRIPTION
FILES
SEE_ALSO
AUTHOR

This document was created by man2html, using the manual pages.
Time: 00:37:57 GMT, March 30, 2022